import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 资产列表
export const zcAssetListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcAssetList',
      data: data
    }
  })
}

// 组织
export const ucMyOrgListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucMyOrgList',
      data: data
    }
  })
}

// 部门
export const ucMyDeptListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucMyDeptList',
      data: data
    }
  })
}

// 盘点规则列表
export const zcInventoryRuleListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryRuleList',
      data: data
    }
  })
}

// 列表查看
export const zcInventoryRuleSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryRuleSee',
      data: data
    }
  })
}

// 列表新增
export const zcInventoryRuleAddAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryRuleAddAdmin',
      data: data
    }
  })
}

// 盘点规则修改
export const zcInventoryRuleEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryRuleEdit',
      data: data
    }
  })
}
// 列表删除
export const zcInventoryRuleDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryRuleDel',
      data: data
    }
  })
}

// 资产列表查看
export const zcInventoryRuleGetAssetListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryRuleGetAssetList',
      data: data
    }
  })
}
